const Net = require("net");

const util = require('./util');

const Client = Net.createConnection({
    host: '127.0.0.1',
    port: 9999,
});

Client.on('connect', () => {
    const mysql = {
        host: '127.0.0.1',
        port: '3306'
    }
    Client.write(util.skSend(JSON.stringify(mysql)));
});

Client.on("close", () => {

});

Client.on("error", () => {

});

Client.on('data', (buf) => {
    util.skGet(Client, buf, (buf) => {
        console.log(buf);
    })
})